<?php
/**
 * @package		Joomla.Site
 * @subpackage	Templates.brainboots
 * @copyright	Copyright (C) 2013 BRAINLEAF Communication, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// Versione: 0.0.1 Alpha // Date: 02/02/2013
// Versione: 0.2.0 Alpha // Date: 10/02/2013
// Versione: 0.2.1 Alpha // Date: 06/03/2013

// Actual Version: 0.2.1 Alpha

// No direct access.
defined('_JEXEC') or die;
JHtml::_('behavior.framework', true);

$app			= JFactory::getApplication();
$doc			= JFactory::getDocument();
$templateparams	= $app->getTemplate(true)->params;
include 'templates/brainboot/functions.php';

// ####### GET PARAMETERS ######### //
// Globals
$fluidCont = $this->params->get('tpl_brboot_container');
if (($fluidCont == 0)or($fluidCont == 5)) { 
	$cont = "container";
}
if (($fluidCont == 1)or($fluidCont == 3)) { 
	$cont = "container-fluid";
}
if (($fluidCont == 2)or($fluidCont == 4)) { 
	$cont = "container-fluid-nopad";
}
// Main Columns
$columns = $this->params->get('tpl_brboot_columns');
$colLeftFix = $this->params->get('tpl_brboot_leftcol_fixed');
$colRightFix = $this->params->get('tpl_brboot_rightcol_fixed');

if ($colLeftFix == 0) {
$colLeftCode = "<div class=\"col-left\"></div>";
}else{
$colLeftCode = "<div class=\"col-left-fix\"></div>";
}
if ($colRightFix == 0) {
$colRightCode = "<div class=\"col-right\"></div>";
}else{
$colRightCode = "<div class=\"col-right-fix\"></div>";
}
// Single Rows

// TOP ROWS //
// Single Column Rows
$rowTop01 = $this->params->get('tpl_brboot_row_top01');
$rowIdTop01 = "Top01";
$fluidRowTop01 = $this->params->get('tpl_brboot_fluidrow_top01');
$addIdTop01 = $this->params->get('tpl_brboot_styleid_top01');
$respSetTop01 = $this->params->get('tpl_brboot_responsiveset_top01');
$addKindTop01 = $this->params->get('tpl_brboot_positionorhtml_top01');
$htmlTop01 = $this->params->get('tpl_brboot_htmlbox_top01');

$rowTop02 = $this->params->get('tpl_brboot_row_top02');
$rowIdTop02 = "Top02";
$fluidRowTop02 = $this->params->get('tpl_brboot_fluidrow_top02');
$addIdTop02 = $this->params->get('tpl_brboot_styleid_top02');
$respSetTop02 = $this->params->get('tpl_brboot_responsiveset_top02');
$addKindTop02 = $this->params->get('tpl_brboot_positionorhtml_top02');
$htmlTop02 = $this->params->get('tpl_brboot_htmlbox_top02');

$rowTop03 = $this->params->get('tpl_brboot_row_top03');
$rowIdTop03 = "Top03";
$fluidRowTop03 = $this->params->get('tpl_brboot_fluidrow_top03');
$addIdTop03 = $this->params->get('tpl_brboot_styleid_top03');
$respSetTop03 = $this->params->get('tpl_brboot_responsiveset_top03');
$addKindTop03 = $this->params->get('tpl_brboot_positionorhtml_top03');
$htmlTop03 = $this->params->get('tpl_brboot_htmlbox_top03');

// COMMON ROWS
$row01 = $this->params->get('tpl_brboot_row_01');
$rowId01 = "01";
$fluidRow01 = $this->params->get('tpl_brboot_fluidrow_01');
$spanCol01 = $this->params->get('tpl_brboot_colnumb_01');
$spanAr01 = $this->params->get('tpl_brboot_sizes_01');
if ($spanAr01 != ""){$spanArr01 = explode(',', $spanAr01);}else{$spanArr01 = null;}
$addId01 = $this->params->get('tpl_brboot_styleid_01');
$respSet01 = $this->params->get('tpl_brboot_responsiveset_01');

$row02 = $this->params->get('tpl_brboot_row_02');
$rowId02 = "02";
$fluidRow02 = $this->params->get('tpl_brboot_fluidrow_02');
$spanCol02 = $this->params->get('tpl_brboot_colnumb_02');
$spanAr02 = $this->params->get('tpl_brboot_sizes_02');
if ($spanAr02 != ""){$spanArr02 = explode(',', $spanAr02);}
$addId02 = $this->params->get('tpl_brboot_styleid_02');
$respSet02 = $this->params->get('tpl_brboot_responsiveset_02');

$row03 = $this->params->get('tpl_brboot_row_03');
$rowId03 = "03";
$fluidRow03 = $this->params->get('tpl_brboot_fluidrow_03');
$spanCol03 = $this->params->get('tpl_brboot_colnumb_03');
$spanAr03 = $this->params->get('tpl_brboot_sizes_03');
if ($spanAr03 != ""){$spanArr03 = explode(',', $spanAr03);}
$addId03 = $this->params->get('tpl_brboot_styleid_03');
$respSet03 = $this->params->get('tpl_brboot_responsiveset_03');

$row04 = $this->params->get('tpl_brboot_row_04');
$rowId04 = "04";
$fluidRow04 = $this->params->get('tpl_brboot_fluidrow_04');
$spanCol04 = $this->params->get('tpl_brboot_colnumb_04');
$spanAr04 = $this->params->get('tpl_brboot_sizes_04');
if ($spanAr04 != ""){$spanArr04 = explode(',', $spanAr04);}
$addId04 = $this->params->get('tpl_brboot_styleid_04');
$respSet04 = $this->params->get('tpl_brboot_responsiveset_04');

$row05 = $this->params->get('tpl_brboot_row_05');
$rowId05 = "05";
$fluidRow05 = $this->params->get('tpl_brboot_fluidrow_05');
$spanCol05 = $this->params->get('tpl_brboot_colnumb_05');
$spanAr05 = $this->params->get('tpl_brboot_sizes_05');
if ($spanAr05 != ""){$spanArr05 = explode(',', $spanAr05);}
$addId05 = $this->params->get('tpl_brboot_styleid_05');
$respSet05 = $this->params->get('tpl_brboot_responsiveset_05');

$row06 = $this->params->get('tpl_brboot_row_06');
$rowId06 = "06";
$fluidRow06 = $this->params->get('tpl_brboot_fluidrow_06');
$spanCol06 = $this->params->get('tpl_brboot_colnumb_06');
$spanAr06 = $this->params->get('tpl_brboot_sizes_06');
if ($spanAr06 != ""){$spanArr06 = explode(',', $spanAr06);}
$addId06 = $this->params->get('tpl_brboot_styleid_06');
$respSet06 = $this->params->get('tpl_brboot_responsiveset_06');

$row07 = $this->params->get('tpl_brboot_row_07');
$rowId07 = "07";
$fluidRow07 = $this->params->get('tpl_brboot_fluidrow_07');
$spanCol07 = $this->params->get('tpl_brboot_colnumb_07');
$spanAr07 = $this->params->get('tpl_brboot_sizes_07');
if ($spanAr07 != ""){$spanArr07 = explode(',', $spanAr07);}
$addId07 = $this->params->get('tpl_brboot_styleid_07');
$respSet07 = $this->params->get('tpl_brboot_responsiveset_07');

$row08 = $this->params->get('tpl_brboot_row_08');
$rowId08 = "08";
$fluidRow08 = $this->params->get('tpl_brboot_fluidrow_08');
$spanCol08 = $this->params->get('tpl_brboot_colnumb_08');
$spanAr08 = $this->params->get('tpl_brboot_sizes_08');
if ($spanAr08 != ""){$spanArr08 = explode(',', $spanAr08);}
$addId08 = $this->params->get('tpl_brboot_styleid_08');
$respSet08 = $this->params->get('tpl_brboot_responsiveset_08');

$row09 = $this->params->get('tpl_brboot_row_09');
$rowId09 = "09";
$fluidRow09 = $this->params->get('tpl_brboot_fluidrow_09');
$spanCol09 = $this->params->get('tpl_brboot_colnumb_09');
$spanAr09 = $this->params->get('tpl_brboot_sizes_09');
if ($spanAr09 != ""){$spanArr09 = explode(',', $spanAr09);}
$addId09 = $this->params->get('tpl_brboot_styleid_09');
$respSet09 = $this->params->get('tpl_brboot_responsiveset_09');

$row10 = $this->params->get('tpl_brboot_row_10');
$rowId10 = "10";
$fluidRow10 = $this->params->get('tpl_brboot_fluidrow_10');
$spanCol10 = $this->params->get('tpl_brboot_colnumb_10');
$spanAr10 = $this->params->get('tpl_brboot_sizes_10');
if ($spanAr10 != ""){$spanArr10 = explode(',', $spanAr10);}
$addId10 = $this->params->get('tpl_brboot_styleid_10');
$respSet10 = $this->params->get('tpl_brboot_responsiveset_10');

// Component Row (max 3 cols)
$compCol01 = $this->params->get('tpl_brboot_comp_colnumb');
$compPos01 = $this->params->get('tpl_brboot_comp_position');
$compSp01 = $this->params->get('tpl_brboot_comp_sizes');
$compSpans01 = explode(',', $compSp01);
$compFluid01 = $this->params->get('tpl_brboot_comp_fluidrow');
// Column Attivation in Component Row by Modules Status
// 
if ($this->countModules('comprow-position-0')) {
	$colFirstComp = 1;
}
if ($this->countModules('comprow-position-1')) {
	$colSecondComp = 1;
}

///////////////////////////////////////////////////////////////////////
// ROWS ATTIVATION BY MODULES STATUS
if($this->countModules('row-01-position-0') or $this->countModules('row-01-position-1') or $this->countModules('row-01-position-2') or $this->countModules('row-01-position-3') or $this->countModules('row-01-position-4') or $this->countModules('row-01-position-5') or $this->countModules('row-01-position-6') or $this->countModules('row-01-position-7') or $this->countModules('row-01-position-8') or $this->countModules('row-01-position-9') or $this->countModules('row-01-position-10') or $this->countModules('row-01-position-10') ) {
$row01modActive = 1;
}

if($this->countModules('row-02-position-0') or $this->countModules('row-02-position-1') or $this->countModules('row-02-position-2') or $this->countModules('row-02-position-3') or $this->countModules('row-02-position-4') or $this->countModules('row-02-position-5') or $this->countModules('row-02-position-6') or $this->countModules('row-02-position-7') or $this->countModules('row-02-position-8') or $this->countModules('row-02-position-9') or $this->countModules('row-02-position-10') or $this->countModules('row-02-position-10') ) {
$row02modActive = 1;
}

if($this->countModules('row-03-position-0') or $this->countModules('row-03-position-1') or $this->countModules('row-03-position-2') or $this->countModules('row-03-position-3') or $this->countModules('row-03-position-4') or $this->countModules('row-03-position-5') or $this->countModules('row-03-position-6') or $this->countModules('row-03-position-7') or $this->countModules('row-03-position-8') or $this->countModules('row-03-position-9') or $this->countModules('row-03-position-10') or $this->countModules('row-03-position-10') ) {
$row03modActive = 1;
}

if($this->countModules('row-04-position-0') or $this->countModules('row-04-position-1') or $this->countModules('row-04-position-2') or $this->countModules('row-04-position-3') or $this->countModules('row-04-position-4') or $this->countModules('row-04-position-5') or $this->countModules('row-04-position-6') or $this->countModules('row-04-position-7') or $this->countModules('row-04-position-8') or $this->countModules('row-04-position-9') or $this->countModules('row-04-position-10') or $this->countModules('row-04-position-10') ) {
$row04modActive = 1;
}

if($this->countModules('row-05-position-0') or $this->countModules('row-05-position-1') or $this->countModules('row-05-position-2') or $this->countModules('row-05-position-3') or $this->countModules('row-05-position-4') or $this->countModules('row-05-position-5') or $this->countModules('row-05-position-6') or $this->countModules('row-05-position-7') or $this->countModules('row-05-position-8') or $this->countModules('row-05-position-9') or $this->countModules('row-05-position-10') or $this->countModules('row-05-position-10') ) {
$row05modActive = 1;
}

if($this->countModules('row-06-position-0') or $this->countModules('row-06-position-1') or $this->countModules('row-06-position-2') or $this->countModules('row-06-position-3') or $this->countModules('row-06-position-4') or $this->countModules('row-06-position-5') or $this->countModules('row-06-position-6') or $this->countModules('row-06-position-7') or $this->countModules('row-06-position-8') or $this->countModules('row-06-position-9') or $this->countModules('row-06-position-10') or $this->countModules('row-06-position-10') ) {
$row06modActive = 1;
}

if($this->countModules('row-07-position-0') or $this->countModules('row-07-position-1') or $this->countModules('row-07-position-2') or $this->countModules('row-07-position-3') or $this->countModules('row-07-position-4') or $this->countModules('row-07-position-5') or $this->countModules('row-07-position-6') or $this->countModules('row-07-position-7') or $this->countModules('row-07-position-8') or $this->countModules('row-07-position-9') or $this->countModules('row-07-position-10') or $this->countModules('row-07-position-10') ) {
$row07modActive = 1;
}

if($this->countModules('row-08-position-0') or $this->countModules('row-08-position-1') or $this->countModules('row-08-position-2') or $this->countModules('row-08-position-3') or $this->countModules('row-08-position-4') or $this->countModules('row-08-position-5') or $this->countModules('row-08-position-6') or $this->countModules('row-08-position-7') or $this->countModules('row-08-position-8') or $this->countModules('row-08-position-9') or $this->countModules('row-08-position-10') or $this->countModules('row-08-position-10') ) {
$row08modActive = 1;
}

if($this->countModules('row-09-position-0') or $this->countModules('row-09-position-1') or $this->countModules('row-09-position-2') or $this->countModules('row-09-position-3') or $this->countModules('row-09-position-4') or $this->countModules('row-09-position-5') or $this->countModules('row-09-position-6') or $this->countModules('row-09-position-7') or $this->countModules('row-09-position-8') or $this->countModules('row-09-position-9') or $this->countModules('row-09-position-10') or $this->countModules('row-09-position-10') ) {
$row09modActive = 1;
}

if($this->countModules('row-10-position-0') or $this->countModules('row-10-position-1') or $this->countModules('row-10-position-2') or $this->countModules('row-10-position-3') or $this->countModules('row-10-position-4') or $this->countModules('row-10-position-5') or $this->countModules('row-10-position-6') or $this->countModules('row-10-position-7') or $this->countModules('row-10-position-8') or $this->countModules('row-10-position-9') or $this->countModules('row-10-position-10') or $this->countModules('row-10-position-10') ) {
$row10modActive = 1;
}


///////////////////////////////////////////////////////////////////////
// Advanced

//Fonts 

$bodyFo = $this->params->get('tpl_brboot_fonts_body');
$h1Fo = $this->params->get('tpl_brboot_fonts_h1');
$h2Fo = $this->params->get('tpl_brboot_fonts_h2');
$h3Fo = $this->params->get('tpl_brboot_fonts_h3');


// Call AddFont function 

$AddFont = AddFonts($bodyFo,$h1Fo,$h2Fo,$h3Fo); 
$fontStyleTxt = $AddFont[0];
$googleFonts = $AddFont[1];


?>

<!DOCTYPE HTML>
<head>

	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<jdoc:include type="head" />

	
	<?php echo $googleFonts; ?>

	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
	
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />
	
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/bootstrap/css/bootstrap.css" type="text/css" />
	
	<?php if ($this->params->get('tpl_brboot_bootstrap_resp') == 1): ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/bootstrap/css/bootstrap-responsive.css" type="text/css" />
	<?php endif; ?>
	
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/js-css/prettify.css" type="text/css" />
	
	<?php echo $fontStyleTxt; ?>
	
</head>

<body>
<?php if ($columns > 0): ?>
<!-- WRAPPER -->
<div class="big-wrapper">
<?php endif; ?>
<?php if($columns == 1){
echo $colLeftCode; // Richiama codice Colonna Sinistra
echo "\n<!-- Main Container for Bootstrap Grid -->\n<div class=\"main-container\">";
} ?>
<?php if($columns == 2){
echo "\n<!-- Main Container for Bootstrap Grid -->\n<div class=\"main-container\">";
} ?>

<?php if($columns == 3){
echo $colLeftCode; // Richiama codice Colonna Sinistra
echo "\n<!-- Main Container for Bootstrap Grid -->\n<div class=\"main-container_small\">";
} ?>

<?php if ($rowTop01 == 1): ?>
<!-- ############################# START BRAINROW TOP01 ###################################################### -->
<div class="brainrow-top01">
<div class="<?php echo $cont; ?>">
<?
echo topRows($rowIdTop01,$fluidRowTop01,$addIdTop01,$respSetTop01,$addKindTop01,$htmlTop01);
?>
</div><!-- /container -->
</div><!-- /brainrow-01 -->
<!-- ############################# END BRAINROW TOP01 ######################################################## -->
<?php endif; ?>

<?php if ($rowTop02 == 1): ?>
<!-- ############################# START BRAINROW TOP02 ###################################################### -->
<div class="brainrow-top02">
<div class="<?php echo $cont; ?>">
<?
echo topRows($rowIdTop02,$fluidRowTop02,$addIdTop02,$respSetTop02,$addKindTop02,$htmlTop02);
?>
</div><!-- /container -->
</div><!-- /brainrow-02 -->
<!-- ############################# END BRAINROW TOP02 ######################################################## -->
<?php endif; ?>

<?php if ($rowTop03 == 1): ?>
<!-- ############################# START BRAINROW TOP03 ###################################################### -->
<div class="brainrow-top03">
<div class="<?php echo $cont; ?>">
<?
echo topRows($rowIdTop03,$fluidRowTop03,$addIdTop03,$respSetTop03,$addKindTop03,$htmlTop03);
?>
</div><!-- /container -->
</div><!-- /brainrow-03 -->
<!-- ############################# END BRAINROW TOP03 ######################################################## -->
<?php endif; ?>

<?php if (($row01 == 1) and ($row01modActive == 1)): ?>
<!-- ############################# START BRAINROW 01 ######################################################### -->
<div class="brainrow-01">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr01 != "") {
			echo SpanArr($spanArr01,$fluidRow01,$addId01,$rowId01,$respSet01);
		}else{
			echo SpanCol($spanCol01,$fluidRow01,$addId01,$rowId01,$respSet01);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-01 -->
<!-- ############################# END BRAINROW 01 ########################################################### -->
<?php endif; ?>

<?php if (($row02 == 1) and ($row02modActive == 1)): ?>
<!-- ############################# START BRAINROW 02 ######################################################### -->
<div class="brainrow-02">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr02 != "") {
			echo SpanArr($spanArr02,$fluidRow02,$addId02,$rowId02,$respSet02);
		}else{
			echo SpanCol($spanCol02,$fluidRow02,$addId02,$rowId02,$respSet01);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-02 -->
<!-- ############################# END BRAINROW 02 ########################################################### -->
<?php endif; ?>

<?php if (($row03 == 1) and ($row03modActive == 1)): ?>
<!-- ############################# START BRAINROW 03 ######################################################### -->
<div class="brainrow-03">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr03 != "") {
			echo SpanArr($spanArr03,$fluidRow03,$addId03,$rowId03,$respSet03);
		}else{
			echo SpanCol($spanCol03,$fluidRow03,$addId03,$rowId03,$respSet03);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-03 -->
<!-- ############################# END BRAINROW 03 ########################################################### -->
<?php endif; ?>

<?php if (($row04 == 1) and ($row04modActive == 1)): ?>
<!-- ############################# START BRAINROW 04 ######################################################### -->
<div class="brainrow-04">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr04 != "") {
			echo SpanArr($spanArr04,$fluidRow04,$addId04,$rowId04,$respSet04);
		}else{
			echo SpanCol($spanCol04,$fluidRow04,$addId04,$rowId04,$respSet04);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-04 -->
<!-- ############################# END BRAINROW 04 ########################################################### -->
<?php endif; ?>

<?php if (($row05 == 1) and ($row05modActive == 1)): ?>
<!-- ############################# START BRAINROW 05 ######################################################### -->
<div class="brainrow-05">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr05 != "") {
			echo SpanArr($spanArr05,$fluidRow05,$addId05,$rowId05,$respSet05);
		}else{
			echo SpanCol($spanCol05,$fluidRow05,$addId05,$rowId05,$respSet05);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-05 -->
<!-- ############################# END BRAINROW 05 ########################################################### -->
<?php endif; ?>



<!-- ############################# START COMPONENT ROW ####################################################### -->
<div class="brainrow-component">
	<div class="<?php echo $cont; ?>">
		<div id="main">
		<?php echo ComponentRow($compCol01, $compPos01, $compSpans01, $compFluid01, $colFirstComp, $colSecondComp ); ?>
		</div>
	</div>
</div>
<!-- ############################# END COMPONENT ROW ######################################################### -->



<?php if (($row06 == 1) and ($row06modActive == 1)): ?>
<!-- ############################# START BRAINROW 06 ######################################################### -->
<div class="brainrow-06">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr06 != "") {
			echo SpanArr($spanArr06,$fluidRow06,$addId06,$rowId06,$respSet06);
		}else{
			echo SpanCol($spanCol06,$fluidRow06,$addId06,$rowId06,$respSet06);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-06 -->
<!-- ############################# END BRAINROW 06 ########################################################### -->
<?php endif; ?>

<?php if (($row07 == 1) and ($row07modActive == 1)): ?>
<!-- ############################# START BRAINROW 07 ######################################################### -->
<div class="brainrow-07">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr07 != "") {
			echo SpanArr($spanArr07,$fluidRow07,$addId07,$rowId07,$respSet07);
		}else{
			echo SpanCol($spanCol07,$fluidRow07,$addId07,$rowId07,$respSet07);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-07 -->
<!-- ############################# END BRAINROW 07 ########################################################### -->
<?php endif; ?>

<?php if (($row08 == 1) and ($row08modActive == 1)): ?>
<!-- ############################# START BRAINROW 08 ######################################################### -->
<div class="brainrow-08">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr08 != "") {
			echo SpanArr($spanArr08,$fluidRow08,$addId08,$rowId08,$respSet08);
		}else{
			echo SpanCol($spanCol08,$fluidRow08,$addId08,$rowId08,$respSet08);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-08 -->
<!-- ############################# END BRAINROW 08 ########################################################### -->
<?php endif; ?>

<?php if (($row09 == 1) and ($row09modActive == 1)): ?>
<!-- ############################# START BRAINROW 09 ######################################################### -->
<div class="brainrow-09">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr09 != "") {
			echo SpanArr($spanArr09,$fluidRow09,$addId09,$rowId09,$respSet09);
		}else{
			echo SpanCol($spanCol09,$fluidRow09,$addId09,$rowId09,$respSet09);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-09 -->
<!-- ############################# END BRAINROW 09 ########################################################### -->
<?php endif; ?>

<?php if (($row10 == 1) and ($row10modActive == 1)): ?>
<!-- ############################# START BRAINROW 10 ######################################################### -->
<div class="brainrow-10">
	<div class="<?php echo $cont; ?>"><!-- bootstrap container (fluid or not) -->
		<?php if ($spanAr10 != "") {
			echo SpanArr($spanArr10,$fluidRow10,$addId10,$rowId10,$respSet10);
		}else{
			echo SpanCol($spanCol10,$fluidRow10,$addId10,$rowId10,$respSet10);
		} ?>
	</div><!-- /container -->
</div><!-- /brainrow-10 -->
<!-- ############################# END BRAINROW 10 ########################################################### -->
<?php endif; ?>

<?php if($columns == 1): ?>
</div><!-- /Main-Container -->
<?php endif; ?>

<?php if($columns == 2){
echo "</div>\n<!-- /Main-Container -->\n";
echo $colRightCode; // Richiama codice Colonna Destra
}
?>
<?php if($columns == 3){
echo "</div>\n<!-- /Main-Container -->\n";
echo $colRightCode; // Richiama codice Colonna Destra
} ?>

<?php if ($columns > 0): ?>
</div><!-- /WRAPPER -->
<?php endif; ?>

<!-- ############################# LINKED SCRIPTS ########################################################### -->
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.0.min.js"></script>
<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/bootstrap/js/bootstrap.min.js"></script>
<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/js/holder.js"></script>
<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/js/prettify.js"></script>
<!-- ############################# /LINKED SCRIPTS ########################################################## -->
</body>



</html>